package com.yuandengta.yomall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yuandengta.common.utils.PageUtils;
import com.yuandengta.yomall.member.entity.MemberEntity;
import com.yuandengta.yomall.member.exception.MemberException;
import com.yuandengta.yomall.member.vo.MemberLoginVO;
import com.yuandengta.yomall.member.vo.MemberRegisterVO;
import com.yuandengta.yomall.member.vo.WeiboUser;

import java.util.Map;

/**
 * 会员
 *
 * @author kevin
 * @email 178676392@qq.com
 * @date 2020-12-22 15:44:34
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 检查手机号唯一
     * @param mobile
     * @throws MemberException
     */
    void checkMobileUnique(String mobile) throws MemberException;

    /**
     * 检查用户名唯一
     * @param username
     * @throws MemberException
     */
    void checkUsernameUnique(String username) throws MemberException;

    /**
     * 会员注册
     * @param registerVO
     */
    void register(MemberRegisterVO registerVO);

    /**
     * 会员登录
     * @param vo
     * @return
     */
    MemberEntity login(MemberLoginVO vo);

    /**
     * 微博登录
     * @param weiboUser
     * @return
     */
    MemberEntity login(WeiboUser weiboUser);
}

